﻿<navigation:Page x:Class="ProTemplate.Views.LoginHistoryView" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           xmlns:telerikGridView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
           xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="登录历史查询">
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="50"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal">
            <TextBlock Text="从：" VerticalAlignment="Center" Margin="10,0" />
            <sdk:DatePicker x:Name="dpStart" VerticalAlignment="Center" />
            <TextBlock Text="到" VerticalAlignment="Center" Margin="10,0" />
            <sdk:DatePicker x:Name="dpEnd"  VerticalAlignment="Center" Margin="10,0"/>
            <Button Content="查询" Height="25" Width="85" Click="Button_Click"></Button>
        </StackPanel>
        <telerikGridView:RadGridView telerik:Theming.Theme="Office_Blue" x:Name="gdCustomsUser" ShowGroupPanel="True"  Grid.Row="1" Style="{StaticResource CommonRadGridView}" 
                                     ItemsSource="{Binding Path=Items, Source={StaticResource LoginHistoryViewModel}}">
            <telerikGridView:RadGridView.Columns>
                <telerik:GridViewSelectColumn />
                <telerik:GridViewDataColumn Header="序号" DataMemberBinding="{Binding Index}" IsFilterable="False" />
                <telerik:GridViewDataColumn Header="用户" DataMemberBinding="{Binding UserName}" />
                <telerik:GridViewDataColumn Header="登录时间" DataMemberBinding="{Binding LoginDate}" />
                <telerik:GridViewDataColumn Header="登录IP" DataMemberBinding="{Binding LoginIP}" />
            </telerikGridView:RadGridView.Columns>
        </telerikGridView:RadGridView>
    </Grid>
</navigation:Page>
